#pragma once
#include "CQueue.h"

class ActionInfo
{
	enum {ActionValueLen = 8};
public:
	int nSrcID;
	int nDestID;
	int nVarID;
	unsigned char valueBuf[ActionValueLen];
	unsigned int nValueLen;
	
	ActionInfo()
	{
		nSrcID = 0;
		nDestID = 0;
		nVarID = 0;
		nValueLen = 0;
		memset(valueBuf, 0, ActionValueLen);
	}
	~ActionInfo(){}
};

class CActionQueue
{
public:
	CActionQueue(void);
	~CActionQueue(void);

	bool Write(const ActionInfo& info, unsigned long nTimeOut = 100);
	ActionInfo Read(unsigned long nTimeOut = 100);

private:
	CQueue<ActionInfo>* pQueue;
};
